import VueRouter from "vue-router";
import Vue from "vue";
import Register from "@/views/user/Register";
import Login from "@/views/user/Login";
import Title from "@/components/Title";
import Company from "@/components/Company";

Vue.use(VueRouter)

const routes=[
    {
        path: "/",
        name: "Login",
        component: Login,
    },
    {
        path: "/register",
        name: "Register",
        component: Register,
    },
    {
        path: "/main",
        name: "Main",
        component: Title,
        children:[
            {
                path: "company",
                name: "Company",
                component:Company,
            }
        ]
    }
]
const  router=new VueRouter({
    routes,

    mode:'history'
})

export default router